package com.ruoyi.project.service;

import java.util.List;
import com.ruoyi.project.domain.FinRecordVoucher;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 记账凭证Service接口
 *
 * @author abel
 * @date 2024-10-15
 */
public interface IFinRecordVoucherService
{
    /**
     * 查询记账凭证
     *
     * @param id 记账凭证ID
     * @return 记账凭证
     */
        FinRecordVoucher selectFinRecordVoucherById(Long id);

    /**
     * 获取记账凭证 ，没有找到数据则抛错
     *
     * @param id 记账凭证ID
     * @return 记账凭证
     */
        FinRecordVoucher getFinRecordVoucherById(Long id);

    /**
     * 查询记账凭证列表
     *
     * @param finRecordVoucher 记账凭证
     * @return 记账凭证集合
     */
    List<FinRecordVoucher> selectFinRecordVoucherList(FinRecordVoucher finRecordVoucher);

    /**
     * 新增记账凭证
     *
     * @param finRecordVoucher 记账凭证
     * @return 结果
     */
    FinRecordVoucher insertFinRecordVoucher(FinRecordVoucher finRecordVoucher);

    /**
     * 修改记账凭证
     *
     * @param finRecordVoucher 记账凭证
     * @return 结果
     */
    int updateFinRecordVoucher(FinRecordVoucher finRecordVoucher);

    /**
     * 批量删除记账凭证
     *
     * @param ids 需要删除的记账凭证ID
     * @return 结果
     */
    int deleteFinRecordVoucherByIds(Long[] ids);

    /**
     * 删除记账凭证信息
     *
     * @param id 记账凭证ID
     * @return 结果
     */
    int deleteFinRecordVoucherById(Long id);

    int getMaxRecordNo(Long packageId, String recordTag,Integer currentYear, Integer currentMonth);

    void check(Long id, boolean result);

    void recordToBook(Long id, boolean result);

    FinRecordVoucher findNextByInfo(Long packageId, String recordTag, Integer currentYear, Integer currentMonth, Integer recordNo);

    FinRecordVoucher findPreByInfo(Long packageId, String recordTag, Integer currentYear, Integer currentMonth, Integer recordNo);
}
